package com.dgut.admodule.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import com.dgut.admodule.entity.Adsbid;

@Repository
public interface IAdsbidDao extends PagingAndSortingRepository<Adsbid,Long>,JpaSpecificationExecutor<Adsbid>
{
	@Query(value = "select * from t_adsbid WHERE bidding_bidId = :bidId ", nativeQuery = true)
	public List<Adsbid> findByBid(@Param("bidId") Long bidId);
	
	@Query(value = "select * from t_adsbid WHERE cName = :cName ", nativeQuery = true)
	public List<Adsbid> findCompany(@Param("cName") String cName);
}
